<!DOCTYPE html>
<html lang = "en">
    <head>
        <title>v-show</title>
    </head>

    <body>

        <div id = "app">
            <input type = "button" value = "改变显示" @click = "changeisshow">
            <img v-show = "isshow" src ="2.jpg"  alt = "">
        </div>

        <!-- 开发环境版本，包含了有帮助的命令行警告 -->
        <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
        
        <script>
            var app = new Vue({
                el:"#app",
                data:{
                    isshow:true,
                    age:17,
                },
                methods: {
                    changeisshow:function() {
                        this.isshow = !this.isshow;
                    }
                },
            })
        </script>
    </body>
</html>